<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Page Title</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <style>
    .margin-transition{
      /* margin-left: 0; */
      background: rgba(0,0,255,0.3);
      transition: margin-left 1s;
    }
    .transform-transition{
      /* transform: translate(0,0); */
      background: rgba(0,255,0,0.3);
      transition: transform 1s;
    }
    .common{
      height: 200px;
      width: 200px;
    }
    img {
      width: 100%;
    }
  </style>
</head>
<body>
 
  <div class="transform-transition common" id="transformTransition">
      <p>transition:tranform 1s</p>
      <img src="./src/1.png" alt="">
  </div>
  <script>
      window.onload = function () {
        var transformTransition = document.getElementById('transformTransition');
        transformTransition.style.transform = "translate(500px,0)"
      }
  </script>  
</body>
</html>